<?php
// 替换base64中的=为_以避免与cookie中的等号混淆
class Base64 {

	public static $BASE64_EQUAL_MARK_REPLACER = "_";

	public static function encode($content) {
		return str_replace("=" ,self::$BASE64_EQUAL_MARK_REPLACER ,base64_encode($content));
	}

	public static function decode($content) {
		return base64_decode(str_replace(self::$BASE64_EQUAL_MARK_REPLACER,"=",$content));
	}
}
